package com.weipt.service;

import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Service;

/**
 * @author weipt
 * @description 消费者
 * @date 2024/1/11 22:03
 */
@Service
public class DirectConsumer {

    @RabbitListener(queues= {"email-direct-queue"})
    public void reviceEmailMsg(String message){
        System.out.println("emailDirect消费者收到消息："+message);
    }

    @RabbitListener(queues= {"sms-direct-queue"})
    public void reviceSmsMsg(String message){
        System.out.println("smsDirect消费者收到消息："+message);
    }

    @RabbitListener(queues= {"msg-direct-queue"})
    public void revicMsgMsg(String message){
        System.out.println("msgDirect消费者收到消息："+message);
    }
}
